$("a").each(function () {
    var link = $(this).attr("href"); if (link != undefined) {
        if (link.indexOf("appid=") < 0 && link.indexOf("javascript") < 0)
        {
            if (link.indexOf("?") > 0)
            { link = link + "&appid=" + hdshop.getParam("appid") }
            else
            { link = link + "?appid=" + hdshop.getParam("appid") }
            $(this).attr("href", link)
        }
    }
});